package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ScrapLogMapper;
import com.ruoyi.system.domain.ScrapLog;
import com.ruoyi.system.service.IScrapLogService;

/**
 * 报废日志Service业务层处理
 * 
 * @author hzl
 * @date 2025-03-25
 */
@Service
public class ScrapLogServiceImpl implements IScrapLogService 
{
    @Autowired
    private ScrapLogMapper scrapLogMapper;

    /**
     * 查询报废日志
     * 
     * @param logId 报废日志主键
     * @return 报废日志
     */
    @Override
    public ScrapLog selectScrapLogByLogId(Long logId)
    {
        return scrapLogMapper.selectScrapLogByLogId(logId);
    }

    /**
     * 查询报废日志列表
     * 
     * @param scrapLog 报废日志
     * @return 报废日志
     */
    @Override
    public List<ScrapLog> selectScrapLogList(ScrapLog scrapLog)
    {
        return scrapLogMapper.selectScrapLogList(scrapLog);
    }

    /**
     * 新增报废日志
     * 
     * @param scrapLog 报废日志
     * @return 结果
     */
    @Override
    public int insertScrapLog(ScrapLog scrapLog)
    {
        return scrapLogMapper.insertScrapLog(scrapLog);
    }

    /**
     * 修改报废日志
     * 
     * @param scrapLog 报废日志
     * @return 结果
     */
    @Override
    public int updateScrapLog(ScrapLog scrapLog)
    {
        return scrapLogMapper.updateScrapLog(scrapLog);
    }

    /**
     * 批量删除报废日志
     * 
     * @param logIds 需要删除的报废日志主键
     * @return 结果
     */
    @Override
    public int deleteScrapLogByLogIds(Long[] logIds)
    {
        return scrapLogMapper.deleteScrapLogByLogIds(logIds);
    }

    /**
     * 删除报废日志信息
     * 
     * @param logId 报废日志主键
     * @return 结果
     */
    @Override
    public int deleteScrapLogByLogId(Long logId)
    {
        return scrapLogMapper.deleteScrapLogByLogId(logId);
    }
}
